.class public Lorg/microemu/android/device/ui/AndroidTextBoxUI;
.super Lorg/microemu/android/device/ui/AndroidDisplayableUI;
.source "AndroidTextBoxUI.java"

# interfaces
.implements Lorg/microemu/device/ui/TextBoxUI;


# instance fields
.field private editView:Landroid/widget/EditText;


# direct methods
.method public constructor <init>(Lorg/microemu/android/MicroEmulatorActivity;Ljavax/microedition/lcdui/TextBox;)V
    .locals 1
    .parameter "activity"
    .parameter "textBox"

    .prologue
    .line 53
    invoke-direct {p0, p1, p2}, Lorg/microemu/android/device/ui/AndroidDisplayableUI;-><init>(Lorg/microemu/android/MicroEmulatorActivity;Ljavax/microedition/lcdui/Displayable;)V

    .line 55
    new-instance v0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;

    invoke-direct {v0, p0, p1, p2}, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;-><init>(Lorg/microemu/android/device/ui/AndroidTextBoxUI;Lorg/microemu/android/MicroEmulatorActivity;Ljavax/microedition/lcdui/TextBox;)V

    invoke-virtual {p1, v0}, Lorg/microemu/android/MicroEmulatorActivity;->post(Ljava/lang/Runnable;)Z

    .line 82
    return-void
.end method

.method static synthetic access$000(Lorg/microemu/android/device/ui/AndroidTextBoxUI;)Landroid/widget/EditText;
    .locals 1
    .parameter "x0"

    .prologue
    .line 48
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->editView:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$002(Lorg/microemu/android/device/ui/AndroidTextBoxUI;Landroid/widget/EditText;)Landroid/widget/EditText;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 48
    iput-object p1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->editView:Landroid/widget/EditText;

    return-object p1
.end method


# virtual methods
.method public getCaretPosition()I
    .locals 1

    .prologue
    .line 89
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->editView:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getSelectionStart()I

    move-result v0

    return v0
.end method

.method public getString()Ljava/lang/String;
    .locals 1

    .prologue
    .line 93
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->editView:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public setString(Ljava/lang/String;)V
    .locals 2
    .parameter "text"

    .prologue
    .line 97
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->editView:Landroid/widget/EditText;

    invoke-virtual {v0, p1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 98
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->editView:Landroid/widget/EditText;

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setSelection(I)V

    .line 99
    return-void
.end method
